#include "AnimatedGraphic.h"

AnimateGraphic::AnimateGraphic()
    : ShooterObject()
{
}

void AnimateGraphic::load(std::unique_ptr<LoaderParams> const &pParams)
{
    ShooterObject::load(pParams);
    m_animSpeed = pParams->getAnimSpeed();
}

void AnimateGraphic::draw()
{
    ShooterObject::draw();
}

void AnimateGraphic::update()
{
    m_currentFrame =
        int((
            (SDL_GetTicks() / (1000 / m_animSpeed)) & m_numFrames));
}

void AnimateGraphic::clean()
{
    ShooterObject::clean();
}